package com.example.miniodemo.controller;

import com.example.miniodemo.common.result.Result;
import com.example.miniodemo.common.service.SystemFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统文件 前端控制层
 *
 * @author Lv
 * @date 2022/11/11
 */
@RestController
@RequestMapping("/system_file")
public class SystemFileController {
    @Autowired
    private SystemFileService systemFileService;

    /**
     * 通过系统文件id获取文件信息
     *
     * @param id 系统文件id
     * @return
     */
    @GetMapping("/{id}")
    public Result<?> get(Integer id) {
        return Result.success(systemFileService.get(id));
    }
}
